import Taro, { Component } from '@tarojs/taro'
import { View, Button, Text } from '@tarojs/components'
import { observer, inject } from '@tarojs/mobx'
import './login.scss'


@inject('counterStore')
@observer
class Register extends Component {

    config = {
        navigationBarTitleText: '注册登录',
        navigationBarTextStyle: 'black',
        navigationBarBackgroundColor: '#fff',
    }
    constructor() {
        super(...arguments)
        this.state = {
            value: '',
            logo: require('../../img/logo.png'),
        }
    }
    onSubmit = (event) => {
        console.log(event.detail.value)
    }
    onReset = (event) => {
        console.log(event.detail.value)
    }
    handleChange = (value) => {
        this.setState({
            value
        })
    }
    componentWillMount() {
        console.log('componentWillMount----');
    }

    componentWillReact() {
        console.log('componentWillReact')
    }

    componentDidMount() { }

    componentWillUnmount() { }

    componentDidShow() { }

    componentDidHide() { }

    increment = () => {
        const { counterStore } = this.props
        counterStore.increment()
    }

    decrement = () => {
        const { counterStore } = this.props
        counterStore.decrement()
    }

    incrementAsync = () => {
        const { counterStore } = this.props
        counterStore.incrementAsync()
    }

    render() {
        const { counterStore: { counter } } = this.props
        const { logo } = this.state;
        return (
            <View className='login-page'>
                <image src={logo}/>
               <Button className="wechat-btn">微信快速登录</Button>
               <View className="tel-btn">手机号登录</View>
            </View>
        )
    }
}

export default Register 
